﻿<%@ page contentType="text/html;charset=utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>欢迎登录需求管理平台</title>
<link href="<%=request.getContextPath()%>/login/css/style.css"
	rel="stylesheet" type="text/css" />

<link rel="stylesheet"
	href="<%=request.getContextPath()%>/js/layui-v1.0.9_rls/layui/css/layui.css"
	media="all" />
<script type="text/javascript"
	src="<%=request.getContextPath()%>/js/layui-v1.0.9_rls/layui/layui.js"></script>

<script type="text/javascript"
	src="<%=request.getContextPath()%>/js/jquery-1.8.0.min.js"></script>

<script type="text/javascript"
	src="<%=request.getContextPath()%>/js/util.js"></script>


<script language="javascript">
	$(function() {
		$('.loginbox').css({
			'position' : 'absolute',
			'left' : ($(window).width() - 692) / 2
		});
		$(window).resize(function() {
			$('.loginbox').css({
				'position' : 'absolute',
				'left' : ($(window).width() - 692) / 2
			});
		})
	});

	var layer;
	layui.use([ 'layer' ], function() {
		layer = layui.layer;
	});

	function login() {
		var loginNo = $("#loginNo").val();
		if(loginNo == ""){
				util.showDialog("用户名不能为空！", 1);
				return;
		}
		var loginPwd = $("#loginPwd").val();
		if(loginPwd == ""){
				util.showDialog("密码不能为空！", 1);
				return;
		}
		
		$.post("<%=request.getContextPath()%>/sys/userLogin",
			{"sysLoginInfo.loginNo":loginNo,"sysLoginInfo.loginPwd":loginPwd},
			function(data){
			
				if(data.retCode==1){
					util.showDialog("账号或密码错误！", 0);
				}else{
					var form =  $('<form id="_tempForm"></form>');
					form.attr('action', "<%=request.getContextPath()%>/rms/index");
					form.attr('method', 'post');
					form.appendTo(document.body).submit(); 
					
					
				}
			
		},"json");
	
	}
	
	


</script>

</head>

<body
	style="background-color:#1c77ac; background-image:url(images/light.png); background-repeat:no-repeat; background-position:center top; overflow:hidden;">



	<div id="mainBody">
		<div id="cloud1" class="cloud"></div>
		<div id="cloud2" class="cloud"></div>
	</div>


	<div class="logintop">
		<span>欢迎登录需求管理平台</span>
		<ul>
			<!--  
	    <li><a href="#">回首页</a></li>
	    <li><a href="#">帮助</a></li>
	    <li><a href="#">关于</a></li>
	    -->
		</ul>
	</div>

	<div class="loginbody">

		<span class="systemlogo"></span>

		<div class="loginbox">
			<form action="" method="post">
					<ul>
						<li><input id="loginNo" name="" type="text" class="loginuser"
							value="" onclick="JavaScript:this.value=''"/>
						</li>
							<li id="pwdLi"><input id="loginPwd" name="" type="password" class="loginpwd" value=""   />
						</li>
						<li ><input name="" type="button" class="loginbtn" value="登录"
							onclick="javascript:login()" />
						</li>
					</ul>
		</form>

		</div>

	</div>



	<div class="loginbm">
		版权所有 2017 <a href="http://www.mycodes.net">北京四维网联科技发展有限公司</a>
	</div>


</body>

</html>
